package com.haidechizi.tree.search;

public class TestBinarySearchTree {

    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.addNode(new Node(10));
        binarySearchTree.addNode(new Node(3));
        binarySearchTree.addNode(new Node(4));
        binarySearchTree.addNode(new Node(7));
        binarySearchTree.addNode(new Node(11));
        binarySearchTree.addNode(new Node(25));
        binarySearchTree.addNode(new Node(8));
        binarySearchTree.midShow();
        System.out.println("==============");
//        binarySearchTree.frontShow();
        System.out.println("==============");
//        binarySearchTree.afterShow();

        Node node = binarySearchTree.searchNode(10);

        System.out.println(node);

        binarySearchTree.deleteNode(10);

        System.out.println("=======");
        binarySearchTree.midShow();


    }
}
